const app = getApp();
Component({
  //接收 外部传入到属性值
  properties: {
    defaultSetting: {
      type: Object,
      value: {
        title: '默认标题',
        height: 20,
        paddingTop: 0,
        backgroundColor: '#124233',
        size: 'default'
      }
    },
    backHome: {
      type: String,
      value: ''
    },
  },
  // 定义响应式数据
  data: {
    height: app.globalData.navBarHeight + app.globalData.statusBarHeight,
    statusBarHeight: app.globalData.statusBarHeight,
    navBarHeight: app.globalData.navBarHeight,
  },
  // 定义方法
  methods: {
    bindCallBack() {
      console.log('bindCallBack',3233)
      if (this.data.backHome === '1') {
        wx.switchTab({
          url: '/pages/homepage/homepage',
        })
      } else if (this.data.backHome === '2') {
        wx.switchTab({
          url: '/pages/personal/personal',
        })
      } else if (this.data.backHome === '10') {
        wx.switchTab({
          url: '/pages/tasks/tasks',
        })
      } else {
        wx.navigateBack({
          delta: 1,
        });
      }

    }
  }
})